setwd("D:/作业/R语言/data for class3")
a=list.files("GSE67835",pattern = "txt")
b=list.files("GSE67835",pattern = "csv")
setwd("GSE67835")
x1=read.table(b[1])
x2=read.table(a,skip = 45,nrows = 3)

c=gsub('_.*',' ',b)
names(x1)=c("id",c[1])
for (i in 2:138) {
  x=read.table(b[i])
  names(x)=c("id",c[i])
  x1=merge(x1,x,by="id")
  
}
write.table(x1,file ="x1")
x3=read.table("x1",nrows = 1)
names(x2)=c(x3)
d=rbind(x1,x2)
write.table(d,file = "实践4第一题附件")
